package com.booking.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Qikai.Lin
 * @date 2023/4/23
 */
@Getter
@AllArgsConstructor
public enum OrderStatusEnums {
    INIT("INIT", "初始化"),
    BOOKING("BOOKING", "已预定"),
    START("START", "进行中"),
    AUDITING("AUDITING", "审核中"),
    END("END", "已完成"),
    ;
    private final String status;
    private final String msg;
    public static String getMsgByStatus(String status) {
        for (OrderStatusEnums enums : OrderStatusEnums.values()) {
            if (enums.getStatus().equals(status)) {
                return enums.getMsg();
            }
        }
        return null;
    }
}
